import { Card, Typography, theme as antdTheme } from 'antd';
import {useTheme} from "@/contexts/ThemeContext.tsx";



const { Title, Paragraph } = Typography;
const { useToken } = antdTheme;
function Page() {
    const { token } = useToken();
    const { theme } = useTheme();
    return (
        <Card style={{ background: token.colorBgContainer }}>
            <Title level={2}>欢迎使用主题切换演示</Title>
            <Paragraph style={{ color: token.colorText }}>
                当前主题为: <strong>{theme === 'dark' ? '暗色' : '亮色'}</strong>
            </Paragraph>
            <Paragraph style={{ color: token.colorText }}>
                点击右上角的切换按钮可以切换主题，您的选择会被保存到本地。
            </Paragraph>


        </Card>
    );
}

export default Page;